#include "Acceptor.h"
#include "Tcpconneciton.h"
#include <iostream>
#include <unistd.h>

using std::cout;
using std::endl;


int test0() {
    string addr = "192.168.213.128";
    unsigned short port = 8888;
    Acceptor Acep(addr, port);
    Acep.ready();
    Tcpconnection tcp(Acep.accept());
    while(1)
    {
        cout<<"please show you info"<<endl;
        cout << ">>recv msg from client: "  << tcp.recv().c_str() << endl;
        tcp.send("hello you\n");
    }
    return 0;
}
int main(void){
    test0();
    return 0;
}